@import '@/assets/styles/var.less';

.settings-page {
  min-height: calc(100vh - 40px);
  background-color: #f5f5f5;

  // 头部导航
  .settings-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;

    .header-left {
      display: flex;
      align-items: center;
      cursor: pointer;
      padding: 8px;
      margin-left: -8px;
      border-radius: 4px;
      transition: background-color 0.2s;

      &:active {
        background-color: #f0f0f0;
      }

      .nut-icon {
        font-size: 20px;
        color: #333;
      }
    }

    .header-title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
    }

    .header-right {
      width: 36px; // 保持平衡
    }
  }

  // 设置内容
  .settings-content {
    margin-top: 44px;
    padding: 16px 0;

    .settings-group {
      margin-bottom: 24px;

      .group-title {
        font-size: 14px;
        color: #999;
        padding: 0 16px 8px;
        font-weight: 500;
      }

      .group-items {
        background: #fff;
        border-radius: 8px;
        margin: 0 16px;
        overflow: hidden;

          .settings-item {
            border-bottom: 1px solid #f0f0f0;
            padding: 16px;
            transition: background-color 0.2s;
            margin-bottom: 0;

            &:last-child {
              border-bottom: none;
            }

          &:active {
            background-color: #f5f5f5;
          }

          &.danger {
            .nut-cell__title {
              color: #ff4757;
            }

            .nut-icon {
              color: #ff4757;
            }
          }

          .nut-cell__title {
            font-size: 16px;
            color: #333;
            font-weight: 500;
          }

          .nut-icon {
            color: #666;
            margin-right: 12px;
            font-size: 20px;
          }

          .nut-cell__right {
            .nut-switch {
              .nut-switch__button {
                background: #07c160;
              }
            }
          }
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 375px) {
  .settings-page {
    .settings-header {
      height: 40px;
      padding: 0 12px;

      .header-title {
        font-size: 16px;
      }
    }

    .settings-content {
      margin-top: 40px;
      padding: 12px 0;

      .settings-group {
        margin-bottom: 20px;

        .group-items {
          margin: 0 12px;
          border-radius: 6px;

          .settings-item {
            padding: 14px;

            .nut-cell__title {
              font-size: 15px;
            }
            .nut-icon {
              font-size: 18px;
              margin-right: 10px;
            }
          }
        }
      }
    }
  }
}

// 超小屏幕适配
@media (max-width: 320px) {
  .settings-page {
    .settings-content {
      .settings-group {
        .group-items {
          .settings-item {
            padding: 12px;

            .nut-cell__title {
              font-size: 14px;
            }

            .nut-icon {
              font-size: 16px;
              margin-right: 8px;
            }
          }
        }
      }
    }
  }
}
